<template>
  <div>
    <div class="container" @click="toIndex">
      <img class="avatar" :src="$store.state.userImg" >
      <div class="userName"><h1>{{$store.state.userName}}</h1></div>
      <div class="userSignature">{{$store.state.userSignature}}</div>
    </div>

  </div>
</template>

<script>
  export default {
    name: "blog",
    data() {
      return {}
    },
    methods: {
      toIndex() {
        console.log('点击了');
        this.$router.push('/index')
      }
    },

  }
</script>

<style lang="less" scoped>
  @import "~@/styles/views/defaultValue.less";

  /* 公共 */
  .container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    position: absolute;
    top: 48%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    min-width: @phoneMin;
    border-radius: @borderRadius * 2;
    background: rgba(0,0,0,.1);

    .avatar {
      width: 60%;
      max-width: 200px;
      margin: 100px auto 0;
      border-radius: 50%;
    }
    .userName {
      margin: 20px auto;
      text-align: center;
    }
    .userSignature {
      margin: 0 30px 100px;
      text-align: center;
    }
  }

  /*电脑*/
  @media screen  and (min-width: @IPadAndPC) {
    .container {
      .userName,
      .userSignature{
        font-size: x-large;
      }
    }
  }

  /*平板*/
  @media screen and (min-width: @phoneAndIPad) and (max-width: @IPadAndPC) {
    .container {
      .userName,
      .userSignature {
        font-size: large;
      }
    }
  }

  /*手机*/
  @media screen and (min-width: @phoneMin) and (max-width: @phoneAndIPad) {}



</style>

